package study.异常;

public class Exception_demo {
    public Exception_demo() {
    }

    public static void main(String[] args) {
        int[] arr = new int[]{1, 2, 3, 4, 5};

        try {
            System.out.println(arr[10]);
        } catch (Exception e) {
            System.out.println(e.getMessage());
            System.out.println(e.toString());
            e.printStackTrace();
        } finally {
            System.out.println("finally");
        }

        System.out.println("这条会正常执行");
    }
}
